/**
 */
package com.my.mytask.mytask.impl;

import com.my.mytask.mytask.ContCon;
import com.my.mytask.mytask.MytaskPackage;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.js.model.rbac.AccessControlModel;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Cont Con</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link com.my.mytask.mytask.impl.ContConImpl#getAcm <em>Acm</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class ContConImpl extends EObjectImpl implements ContCon {
	/**
	 * The cached value of the '{@link #getAcm() <em>Acm</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getAcm()
	 * @generated
	 * @ordered
	 */
	protected AccessControlModel acm;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected ContConImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return MytaskPackage.Literals.CONT_CON;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public AccessControlModel getAcm() {
		if (acm != null && acm.eIsProxy()) {
			InternalEObject oldAcm = (InternalEObject)acm;
			acm = (AccessControlModel)eResolveProxy(oldAcm);
			if (acm != oldAcm) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, MytaskPackage.CONT_CON__ACM, oldAcm, acm));
			}
		}
		return acm;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public AccessControlModel basicGetAcm() {
		return acm;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setAcm(AccessControlModel newAcm) {
		AccessControlModel oldAcm = acm;
		acm = newAcm;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MytaskPackage.CONT_CON__ACM, oldAcm, acm));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case MytaskPackage.CONT_CON__ACM:
				if (resolve) return getAcm();
				return basicGetAcm();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case MytaskPackage.CONT_CON__ACM:
				setAcm((AccessControlModel)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case MytaskPackage.CONT_CON__ACM:
				setAcm((AccessControlModel)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case MytaskPackage.CONT_CON__ACM:
				return acm != null;
		}
		return super.eIsSet(featureID);
	}

} //ContConImpl
